package com.pan.seed;

import com.pan.anno.Seed;

public class SeedTest {

    public static void checkSeed(Class c){
        if(c.isAnnotationPresent(Seed.class)){
            Seed annotation = (Seed) c.getDeclaredAnnotation(Seed.class);
            int age = annotation.age();
            String description = annotation.description();
            System.out.println("age:"+age+",description:"+description);
        }
    }

    public static void main(String[] args) {
        //有seed注解
        Jesus jesus = new Jesus();
        //没有seed注解
        Jone jone =new Jone();
        checkSeed(jesus.getClass());
        checkSeed(jone.getClass());
    }
}
